﻿@page "/like"
@using MG.Library.Models
@inject IFavoriteStorage _favoriteStorage
@inject IMGStorage _mgStorage
@inject INavigaitionService _navigaitionService

@code {
    private List<MgLike> _mgLikes = new();

    private string _status = String.Empty;
        
        public const string Loading = "正在载入";

        public const string NoMoreResult = "没有更多结果";

    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        if (!firstRender)
        {
            return;
        }

        _status = Loading;
        _mgLikes.Clear();
        StateHasChanged();

        var likes = await _favoriteStorage.GetFavoritesAsync();

    }

    public class MgLike
    {
        public Mg Mg { get; set; }

        public Models.Favorite Favorite { get; set; }
    }
}
